3.36 \(\int (b \cos (c+d x))^m (A-\frac {A (2+m) \cos ^2(c+d x)}{1+m}) \, dx\)

Optimal. Leaf size=32 \[ -\frac {A \sin (c+d x) (b \cos (c+d x))^{m+1}}{b d (m+1)} \]

[Out]

-A*(b*cos(d*x+c))^(1+m)*sin(d*x+c)/b/d/(1+m)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.031, Rules used = {3011} \[ -\frac {A \sin (c+d x) (b \cos (c+d x))^{m+1}}{b d (m+1)} \]

Antiderivative was successfully verified.

[In]

Int[(b*Cos[c + d*x])^m*(A - (A*(2 + m)*Cos[c + d*x]^2)/(1 + m)),x]

[Out]

-((A*(b*Cos[c + d*x])^(1 + m)*Sin[c + d*x])/(b*d*(1 + m)))

Rule 3011

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*Cos[e
 + f*x]*(b*Sin[e + f*x])^(m + 1))/(b*f*(m + 1)), x] /; FreeQ[{b, e, f, A, C, m}, x] && EqQ[A*(m + 2) + C*(m +
1), 0]

Rubi steps

\begin {align*} \int (b \cos (c+d x))^m \left (A-\frac {A (2+m) \cos ^2(c+d x)}{1+m}\right ) \, dx &=-\frac {A (b \cos (c+d x))^{1+m} \sin (c+d x)}{b d (1+m)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.22, size = 119, normalized size = 3.72 \[ \frac {A \sin (c+d x) \cos (c+d x) (b \cos (c+d x))^m \left ((m+2) \cos ^2(c+d x) \, _2F_1\left (\frac {1}{2},\frac {m+3}{2};\frac {m+5}{2};\cos ^2(c+d x)\right )-(m+3) \, _2F_1\left (\frac {1}{2},\frac {m+1}{2};\frac {m+3}{2};\cos ^2(c+d x)\right )\right )}{d (m+1) (m+3) \sqrt {\sin ^2(c+d x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(b*Cos[c + d*x])^m*(A - (A*(2 + m)*Cos[c + d*x]^2)/(1 + m)),x]

[Out]

(A*Cos[c + d*x]*(b*Cos[c + d*x])^m*(-((3 + m)*Hypergeometric2F1[1/2, (1 + m)/2, (3 + m)/2, Cos[c + d*x]^2]) +
(2 + m)*Cos[c + d*x]^2*Hypergeometric2F1[1/2, (3 + m)/2, (5 + m)/2, Cos[c + d*x]^2])*Sin[c + d*x])/(d*(1 + m)*
(3 + m)*Sqrt[Sin[c + d*x]^2])

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 32, normalized size = 1.00 \[ -\frac {\left (b \cos \left (d x + c\right )\right )^{m} A \cos \left (d x + c\right ) \sin \left (d x + c\right )}{d m + d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*cos(d*x+c))^m*(A-A*(2+m)*cos(d*x+c)^2/(1+m)),x, algorithm="fricas")

[Out]

-(b*cos(d*x + c))^m*A*cos(d*x + c)*sin(d*x + c)/(d*m + d)

________________________________________________________________________________________

giac [B]  time = 35.51, size = 2489, normalized size = 77.78 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*cos(d*x+c))^m*(A-A*(2+m)*cos(d*x+c)^2/(1+m)),x, algorithm="giac")

[Out]

-2*(A*(abs(tan(1/2*d*x + 1/2*c)^2 - 1)*abs(b)/(tan(1/2*d*x + 1/2*c)^2 + 1))^m*tan(-1/4*pi*m*sgn(2*b*tan(1/2*d*
x + 1/2*c)^4 - 4*b*tan(1/2*d*x + 1/2*c)^2 + 2*b)*sgn(tan(1/2*d*x + 1/2*c)^2 - 1)*sgn(b)*sgn(tan(1/2*d*x + 1/2*
c)) + 1/4*pi*m*sgn(tan(1/2*d*x + 1/2*c)^2 - 1)*sgn(b)*sgn(tan(1/2*d*x + 1/2*c)) + 1/4*pi*m*sgn(tan(1/2*d*x + 1
/2*c)^2 - 1)*sgn(tan(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 1/2*c)^2 + d*m + d)

________________________________________________________________________________________

maple [F]  time = 1.66, size = 0, normalized size = 0.00 \[ \int \left (b \cos \left (d x +c \right )\right )^{m} \left (A -\frac {A \left (2+m \right ) \left (\cos ^{2}\left (d x +c \right )\right )}{1+m}\right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*cos(d*x+c))^m*(A-A*(2+m)*cos(d*x+c)^2/(1+m)),x)

[Out]

int((b*cos(d*x+c))^m*(A-A*(2+m)*cos(d*x+c)^2/(1+m)),x)

________________________________________________________________________________________

maxima [B]  time = 0.68, size = 175, normalized size = 5.47 \[ \frac {{\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{2} \, m} A b^{m} \sin \left (-{\left (d x + c\right )} {\left (m + 2\right )} + m \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) - {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{2} \, m} A b^{m} \sin \left (-{\left (d x + c\right )} {\left (m - 2\right )} + m \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )}{4 \cdot 2^{m} d {\left (m + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*cos(d*x+c))^m*(A-A*(2+m)*cos(d*x+c)^2/(1+m)),x, algorithm="maxima")

[Out]

1/4*((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/2*m)*A*b^m*sin(-(d*x + c)*(m + 2) +
 m*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) - (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x +
 2*c) + 1)^(1/2*m)*A*b^m*sin(-(d*x + c)*(m - 2) + m*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)))/(2^m*d*(
m + 1))

________________________________________________________________________________________

mupad [B]  time = 0.99, size = 30, normalized size = 0.94 \[ -\frac {A\,\sin \left (2\,c+2\,d\,x\right )\,{\left (b\,\cos \left (c+d\,x\right )\right )}^m}{2\,d\,\left (m+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*cos(c + d*x))^m*(A - (A*cos(c + d*x)^2*(m + 2))/(m + 1)),x)

[Out]

-(A*sin(2*c + 2*d*x)*(b*cos(c + d*x))^m)/(2*d*(m + 1))

________________________________________________________________________________________

sympy [A]  time = 88.18, size = 272, normalized size = 8.50 \[ \begin {cases} \frac {2 A \left (- \frac {b \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{\tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 1} + \frac {b}{\tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 1}\right )^{m} \tan ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{d m \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 2 d m \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + d m + d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 2 d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + d} - \frac {2 A \left (- \frac {b \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{\tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 1} + \frac {b}{\tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 1}\right )^{m} \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{d m \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 2 d m \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + d m + d \tan ^{4}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 2 d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + d} & \text {for}\: d \neq 0 \\x \left (b \cos {\relax (c )}\right )^{m} \left (A - \frac {A \left (m + 2\right ) \cos ^{2}{\relax (c )}}{m + 1}\right ) & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*cos(d*x+c))**m*(A-A*(2+m)*cos(d*x+c)**2/(1+m)),x)

[Out]

Piecewise((2*A*(-b*tan(c/2 + d*x/2)**2/(tan(c/2 + d*x/2)**2 + 1) + b/(tan(c/2 + d*x/2)**2 + 1))**m*tan(c/2 + d
*x/2)**3/(d*m*tan(c/2 + d*x/2)**4 + 2*d*m*tan(c/2 + d*x/2)**2 + d*m + d*tan(c/2 + d*x/2)**4 + 2*d*tan(c/2 + d*
x/2)**2 + d) - 2*A*(-b*tan(c/2 + d*x/2)**2/(tan(c/2 + d*x/2)**2 + 1) + b/(tan(c/2 + d*x/2)**2 + 1))**m*tan(c/2
 + d*x/2)/(d*m*tan(c/2 + d*x/2)**4 + 2*d*m*tan(c/2 + d*x/2)**2 + d*m + d*tan(c/2 + d*x/2)**4 + 2*d*tan(c/2 + d
*x/2)**2 + d), Ne(d, 0)), (x*(b*cos(c))**m*(A - A*(m + 2)*cos(c)**2/(m + 1)), True))

________________________________________________________________________________________